"""
数据源插件类
用于从不同数据源获取数据
"""

from abc import abstractmethod
from typing import List, Dict, Any
from .base_plugin import BasePlugin


class DataSourcePlugin(BasePlugin):
    """数据源插件基类"""
    
    @abstractmethod
    async def connect(self) -> bool:
        """连接数据源"""
        pass
    
    @abstractmethod
    async def fetch_data(self, query: Dict[str, Any]) -> List[Dict[str, Any]]:
        """获取数据"""
        pass
    
    @abstractmethod
    async def close(self):
        """关闭连接"""
        pass